import React from "react";
// react-redux
import { Provider } from "react-redux";
import store from "store/index";
// 路由 路由这里没用 react-router-config这个插件
import { HashRouter, Switch, Route } from "react-router-dom";
// import { renderRoutes } from "react-router-config";这玩意重定向用不了 拦截也需要配 还不如用原生
import PrivateRouter from "router/c-cpns/privateRouter";

import Login from "views/account";
import Index from "views/layout";

const App: React.FC = () => {
  return (
    <HashRouter>
      <Provider store={store}>
        <HashRouter>
          <Switch>
            <Route component={Login} exact path="/" />
            {/* 这里还可以放其它路由  */}
            <PrivateRouter component={Index} path="/index" />
          </Switch>
        </HashRouter>
      </Provider>
    </HashRouter>
  );
};

export default App;
